-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix message timestamp=0 when archiving MUC legacy messages #4294
Conversation
Add mongoose_mam_id:reset/0 for debugging
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / aed71bf small_tests_25 / small_tests / aed71bf small_tests_26 / small_tests / aed71bf small_tests_26_arm64 / small_tests / aed71bf ldap_mnesia_25 / ldap_mnesia / aed71bf ldap_mnesia_26 / ldap_mnesia / aed71bf dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / aed71bf dynamic_domains_mysql_redis_26 / mysql_redis / aed71bf dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / aed71bf internal_mnesia_26 / internal_mnesia / aed71bf dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / aed71bf pgsql_cets_26 / pgsql_cets / aed71bf pgsql_mnesia_25 / pgsql_mnesia / aed71bf pgsql_mnesia_26 / pgsql_mnesia / aed71bf mysql_redis_26 / mysql_redis / aed71bf mssql_mnesia_26 / odbc_mssql_mnesia / aed71bf |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4294 +/- ##
=======================================
Coverage 84.53% 84.53%
=======================================
Files 553 553
Lines 33718 33718
=======================================
+ Hits 28503 28504 +1
+ Misses 5215 5214 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mixed feelings about this, because it looks like we don't know what causes the issue, so it's fabricated in tests with a NIF that is used only in that test 🙁
Test using a mock
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / ea8c809 small_tests_25 / small_tests / ea8c809 small_tests_26 / small_tests / ea8c809 small_tests_26_arm64 / small_tests / ea8c809 ldap_mnesia_25 / ldap_mnesia / ea8c809 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / ea8c809 mam_SUITE:rdbms_cache_muc_all:muc06:muc_show_x_user_for_your_own_messages_in_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} ldap_mnesia_26 / ldap_mnesia / ea8c809 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / ea8c809 mam_SUITE:rdbms_muc_all:muc04:muc_multiple_devices{error,
{function_clause,
[{exml_query,attr,[undefined,<<"by">>,undefined],[]},
{mam_SUITE,'-muc_multiple_devices/1-fun-0-',5,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2291}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} mam_SUITE:rdbms_async_cache_muc_all:muc06:muc_sanitize_x_user_in_non_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} mam_SUITE:rdbms_mnesia_cache_muc_all:muc06:muc_sanitize_x_user_in_non_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} dynamic_domains_mysql_redis_26 / mysql_redis / ea8c809 mam_SUITE:rdbms_async_cache_muc_all:muc06:muc_archive_request{error,
{function_clause,
[{exml_query,attr,[undefined,<<"by">>,undefined],[]},
{mam_SUITE,'-muc_archive_request/1-fun-0-',4,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2174}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} mam_SUITE:rdbms_cache_muc_all:muc06:muc_multiple_devices{error,
{function_clause,
[{exml_query,attr,[undefined,<<"by">>,undefined],[]},
{mam_SUITE,'-muc_multiple_devices/1-fun-0-',5,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2291}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} mam_SUITE:rdbms_cache_muc_all:muc06:muc_delete_x_user_in_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} internal_mnesia_26 / internal_mnesia / ea8c809 pgsql_cets_26 / pgsql_cets / ea8c809 mam_SUITE:rdbms_muc_all:muc04:muc_sanitize_x_user_in_non_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} mam_SUITE:rdbms_async_pool_muc_all:muc04:muc_text_search_request{error,{test_case_failed,"Respond size is 2, 3 is expected."}} dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / ea8c809 mam_SUITE:rdbms_async_pool_muc_all:muc04:muc_archive_request{error,
{function_clause,
[{exml_query,attr,[undefined,<<"by">>,undefined],[]},
{mam_SUITE,'-muc_archive_request/1-fun-0-',4,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2174}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} mam_SUITE:rdbms_mnesia_muc_all:muc06:muc_message_with_stanzaid{error,
{function_clause,
[{exml_query,attr,[undefined,<<"xmlns">>,undefined],[]},
{mam_SUITE,'-muc_message_with_stanzaid/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2084}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} pgsql_mnesia_25 / pgsql_mnesia / ea8c809 mam_SUITE:rdbms_muc_all:muc06:retract_muc_message{error,{test_case_failed,"Respond size is 1, 2 is expected."}} mssql_mnesia_26 / odbc_mssql_mnesia / ea8c809 mam_SUITE:rdbms_cache_muc_all:muc04:muc_text_search_request{error,{test_case_failed,"Respond size is 2, 3 is expected."}} pgsql_mnesia_26 / pgsql_mnesia / ea8c809 mam_SUITE:rdbms_mnesia_muc_all:muc06:muc_delete_x_user_in_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} mam_SUITE:rdbms_cache_muc_all:muc06:muc_delete_x_user_in_anon_rooms{error,{test_case_failed,"Respond size is 0, 1 is expected."}} mam_SUITE:rdbms_mnesia_cache_muc_all:muc04:muc_text_search_request{error,{test_case_failed,"Respond size is 2, 3 is expected."}} mam_SUITE:rdbms_mnesia_cache_muc_all:muc06:retract_muc_message{error,{test_case_failed,"Respond size is 1, 2 is expected."}} mysql_redis_26 / mysql_redis / ea8c809 mam_SUITE:rdbms_mnesia_muc_all:muc04:muc_archive_request{error,
{function_clause,
[{exml_query,attr,[undefined,<<"by">>,undefined],[]},
{mam_SUITE,'-muc_archive_request/1-fun-0-',4,
[{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
{line,2174}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} |
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / e9a08b5 small_tests_25 / small_tests / e9a08b5 small_tests_26 / small_tests / e9a08b5 small_tests_26_arm64 / small_tests / e9a08b5 ldap_mnesia_25 / ldap_mnesia / e9a08b5 dynamic_domains_mysql_redis_26 / mysql_redis / e9a08b5 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / e9a08b5 ldap_mnesia_26 / ldap_mnesia / e9a08b5 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / e9a08b5 internal_mnesia_26 / internal_mnesia / e9a08b5 pgsql_cets_26 / pgsql_cets / e9a08b5 service_domain_db_SUITE:db:plain_db_sequential:db_out_of_sync_restarts_service{error,
{{badmatch,false},
[{service_domain_db_SUITE,db_out_of_sync_restarts_service,1,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,711}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / e9a08b5 mysql_redis_26 / mysql_redis / e9a08b5 pgsql_mnesia_25 / pgsql_mnesia / e9a08b5 pgsql_mnesia_26 / pgsql_mnesia / e9a08b5 mssql_mnesia_26 / odbc_mssql_mnesia / e9a08b5 small_tests_26 / small_tests / e9a08b5 pgsql_cets_26 / pgsql_cets / e9a08b5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, thanks for the update 👍
In my previous review, I misunderstood how this was supposed to work.
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 5a31967 small_tests_25 / small_tests / 5a31967 small_tests_26 / small_tests / 5a31967 small_tests_26_arm64 / small_tests / 5a31967 ldap_mnesia_26 / ldap_mnesia / 5a31967 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 5a31967 ldap_mnesia_25 / ldap_mnesia / 5a31967 dynamic_domains_mysql_redis_26 / mysql_redis / 5a31967 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 5a31967 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 5a31967 internal_mnesia_26 / internal_mnesia / 5a31967 pgsql_mnesia_25 / pgsql_mnesia / 5a31967 pgsql_cets_26 / pgsql_cets / 5a31967 mysql_redis_26 / mysql_redis / 5a31967 pgsql_mnesia_26 / pgsql_mnesia / 5a31967 mssql_mnesia_26 / odbc_mssql_mnesia / 5a31967 |
Fix for:
Proposed changes include:
Test fails with (without a fix):
Fix for #4269